
var bemail=false;
var bpass=false;
var bpass1=false;
function checkEmail(obj)
{  
	//
	var reg= /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
	var patt=new RegExp(reg);
	var wemail=document.getElementById("wrongEmail");
	var img=document.getElementById("imgemail");
	var eamil=document.getElementById("email");
	eamil.style.backgroundColor="white";
	
	if(obj.value.length==0)
	{
		obj.style.backgroundColor="#FFDEDE";
		wemail.style.color="red";
		wemail.innerText="邮箱不可为空";
		bemail=false;
		
	}else if(!patt.test(obj.value))
	{
		wemail.style.color="red";
		wemail.innerText="邮箱错误";
		bemail=false;
		//wemail2.style.display="none";
		
	}else{
		
		//wemail.style.display="none";
		obj.style.backgroundColor="#white";
		wemail.innerText="正确";
		bemail= true;
		
	}
}
function getEmail()
{
	
	var eamil=document.getElementById("email");
	var lable=document.getElementById("wrongEmail");
	lable.style.color="#6E932D";
	lable.innerText="请填写您常用的Email地址";
	eamil.style.backgroundColor="#EDFFD5";
  
}
function getPass()
{
  
  var password=document.getElementById("password");
  var wrongpass=document.getElementById("wrongpass");
  password.style.backgroundColor="#EDFFD5";
  wrongpass.style.color="#6E932D";
  wrongpass.innerText="密码可使用数字字母加特殊符号的组合长度6-20个字符";
}
function checkPass(obj)
{	
	  var wrongpass=document.getElementById("wrongpass");
	  var password=document.getElementById("password");
		  password.style.backgroundColor="white";
	  if(obj.value.length==0)
	  {
          wrongpass.style.color="red";		  
		  wrongpass.innerText="密码不能为空";
		  bpass=false;
	  }
	  else if(obj.value.length<6&obj.value.length>0)
	  {
		  wrongpass.style.color="red";		  
		  wrongpass.innerText="密码格式错误请使用数字字母加特殊符号的组合长度6-20个字符";
		  bpass=false;
		  		  
	  }else
	  {
		  obj.style.backgroundColor="#white";
		 
		  wrongpass.style.color="#6E932D";
		  wrongpass.innerText="正确";
		 bpass= true;
	  }
}
function getPass1()
{
	  var password=document.getElementById("password1");
	  var wrongpass=document.getElementById("wrongpass1");
	  password.style.backgroundColor="#EDFFD5";
	  wrongpass.style.color="#6E932D";
	  wrongpass.innerText="请再次输入您设置的密码";
}
function recheckPass(obj)
{
	var wrongpass=document.getElementById("wrongpass1");
	var passtxt=document.getElementById("passtxt");
	var password=document.getElementById("password1");
	password.style.backgroundColor="white";
	if(obj.value==passtxt.value&passtxt.value.length>0)
	{
		  wrongpass.style.color="#6E932D";
		  wrongpass.innerText="正确";
		 bpass1= true;
	}else
	{
		
		 wrongpass.style.color="red";
		 wrongpass.innerText="密码不一致情重新输入";
		 bpass1=false;
		
	}
}
  function checkLast()
  {
	 
	
	
	  
	if(bpass&&bpass1&&bemail)
	{
		return true;
	}
	else {
		   return false;
		}
	 
	  
  }